import { createApp } from "vue";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

// 做了ElementPlus 按需导入之后，针对
//    ElMessage、ElMessageBox、ElNotification
//    需要单独引入他们的样式
//  ElMessage  
import "element-plus/es/components/message/style/css";
//  ElMessageBox
// import "element-plus/es/components/message-box/style/css";
//  ElNotification
// import "element-plus/es/components/notification/style/css";


import router from "./router";
import store from "./store";
import App from "./App.vue";
import "./global.scss";

// 引入 directives 插件
import directives from "./directives";
// 引入 components 插件
import components from "./components";

const app = createApp(App);

// 将 icon 图标组件全部都被注册
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

// 使用插件
app.use(directives).use(components).use(router).use(store);
app.mount("#app");
